package s0404.service;

import s0404.entity.Department;
import s0404.entity.School;
import s0404.exception.BaseException;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.Collection;

/**
 * @author 刘永渠
 * @project xg22
 * @date 2024/3/27
 */
public interface DepartmentService {
    Collection<Department> findAll() throws SQLException, BaseException, InvocationTargetException;
    Collection<Department> getAll(School school) throws SQLException, BaseException, InvocationTargetException;
    int countAll(School school) throws SQLException, BaseException;

    boolean add(Department department) throws SQLException, BaseException;
    boolean delete(Integer id) throws SQLException, BaseException;

    boolean delete(Department department) throws SQLException, BaseException;

    Department find(Integer id) throws SQLException, BaseException, InvocationTargetException;

}
